#include <QtCore>
#include <QLibrary>

const QString optraDll = "libengine";

typedef int (*Prototype)(int, char**);

int main(int argc, char **argv)
{
    QLibrary lib(optraDll);
    if (!lib.load()){
        qDebug("error in load string %s, code", lib.errorString().toAscii().data());
        return 1;        
    }
    Prototype p =  (Prototype)lib.resolve("optra_entry");
    if (p == 0){
        qDebug("optra is corrupt (no entry point)");
        return 2;
    }
    return p(argc, argv);
}
